package com.erclab.xbuilder.formelements;

import com.erclab.internal.xpresso.formelements.Hidden;
import com.erclab.internal.xpresso.forms.Form;
import com.erclab.internal.xpresso.util.FormElementUtil;

public class FormNameCreator extends Hidden {

	@Override
	public String[] processSubmittedValues(Form theForm, String[] submittedValues) {
		String title = ((String[])FormElementUtil.getElementValue(theForm, "title"))[0];
		title = title.replace(' ', '_');
		return new String[]{title};
	}
	
}
